package cn.wizzer.app.web.modules.controllers.cms;

import cn.wizzer.app.cms.modules.services.CmsActivityService;
import cn.wizzer.framework.util.Result;
import cn.wizzer.framework.util.param.ParamVerify;
import com.alibaba.dubbo.config.annotation.Reference;
import org.nutz.ioc.loader.annotation.Inject;
import org.nutz.ioc.loader.annotation.IocBean;
import org.nutz.mvc.annotation.At;
import org.nutz.mvc.annotation.Ok;

/**
 * @author zl
 * @date 2020/7/1 17:01
 */
@IocBean
@At("/cms/activity")
public class ApiActivityController {

    @Inject
    @Reference
    private CmsActivityService cmsActivityService;

    @At
    @Ok("json:{locked:'remark'}")
    public Result list(@ParamVerify(required = true) String language) {
        return Result.success().addData(cmsActivityService.list(language));
    }

}
